package com.example.common.exception.errcode;

public enum ErrCodeBase implements ErrCode{
    UNDEFINED_ERROR(50000, "未定义异常"),
    NULL_POINTER_EXCEPTION(50001, "空指针异常"),
    REQUIRED_BODY_MISSING(50002, "请求体丢失"),
    TOKEN_NULL_EXCEPTION(50003, "没有 token"),
    TOKEN_EXPIRED_EXCEPTION(50004, "token过期"),
    VALIDATED_EXCEPTION(50006, "数据校验异常"),
    SQL_CONSTRAINT_EXCEPTION(50007, "SQL约束异常"),



    NOT_FOUND(404, "Not Found")
    ;


    private int code;
    private String msg;

    ErrCodeBase(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
